Linear Phase Lowpass Filter Design
socp
FICO-Xpress
GAMS
short
=0
$offtext
*=== N2 is half the length of the FIR filter (i.e. number of discretization points) (Use N2=10,20,40,80)
$If not set N2 $set N2 10
scalar n2 /%N2%/;
scalar n; n = 2*n2;
Scalar pi; pi = 4*arctan(1);
Scalar beta /0.01/;
Scalar omega_s; omega_s = 2*pi/3;
Scalar omega_p; omega_p = pi/2;
Scalar step; step = pi/180;
Set i /0*180/
omega_stop(i) /120*180/
omega_pass(i) /0*90/
k /0*%N2%/;
Parameter omega(i);
omega(i) = [ord(i)-1]*step;
Variable h(k)
t
v2 "for conic variable u-t"
v3 "for conic variable u+t"
;
Positive Variable u, v, v3;
Equation passband_up_bnds(i)
cone_lhs, cone_rhs
so
passband_lo_bnds(i)
stopband_bnds(i)
stopband_bnds2(i)
;
passband_up_bnds(i)$omega_pass(i)..
2* sum(k$[ord(k)
This model finds the filter weights for a finite impulse response (FIR) filter.
We use rotated quadratic cones for the constraints.
Lobo, M S, Vandenberghe, L, Boyd, S, and Lebret, H, Applications
of Second Order Cone Programming. Linear Algebra and its Applications,
Special Issue on Linear Algebra in Control, Signals and Image
Processing. 284 (November, 1998).
Vanderbei, R, online at
http://www.princeton.edu/~rvdb/ampl/nlmodels/facloc/emfl_socp.mod